package com.cloudstudy.dao;

import com.cloudstudy.entity.Payment;
import com.cloudstudy.tool.SeqTool;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.Map;

/**
 * @auther zzyy
 * @create 2020-02-18 10:27
 */
@Repository
public class PaymentDao
{
    public static Map<String, Payment> map = new HashMap();

    public String create(Payment payment){
        payment.setId(SeqTool.uuid());
        map.put(payment.getId(), payment);
        return payment.getId();
    }

    public Payment getPaymentById(String id){
        return map.get(id);
    }
}
